﻿using System;
using System.Collections.Generic;
using System.IdentityModel.Claims;
using System.IdentityModel.Policy;
using System.Linq;
using System.Security;
using System.Security.Permissions;
using System.ServiceModel;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Header.Security
{
	public class ChauLucAuthorizationPolicyV1 : IAuthorizationPolicy
	{
		bool IAuthorizationPolicy.Evaluate(EvaluationContext evaluationContext, ref object state)
		{
			foreach (ClaimSet cs in evaluationContext.ClaimSets)
			{
				Console.WriteLine("ClaimSet...");

				foreach (Claim c in cs)
				{
					Console.WriteLine("\tClaim [{0}], [{1}], [{2}]",
					  c.ClaimType, c.Resource, c.Right);
				}
			}
			Console.WriteLine("Properties...");
			foreach (string s in evaluationContext.Properties.Keys)
			{
				Console.WriteLine("\tProperty [{0}], [{1}]",
				  s, evaluationContext.Properties[s]);
			}
			throw new NotImplementedException();
		}

		ClaimSet IAuthorizationPolicy.Issuer
		{
			get { throw new NotImplementedException(); }
		}

		string IAuthorizationComponent.Id
		{
			get { throw new NotImplementedException(); }
		}
	}
}
